feat: add uipath trace CLI command for trajectory visualization#1546
Open
DragosBobolea wants to merge 1 commit intomainfrom
Open
feat: add uipath trace CLI command for trajectory visualization#1546DragosBobolea wants to merge 1 commit intomainfrom
uipath trace CLI command for trajectory visualization#1546DragosBobolea wants to merge 1 commit intomainfrom
Conversation
Add a new `uipath trace` command that reads JSONL trace files (from `uipath run --trace-file` or `uipath eval --trace-file`) and eval verbose JSON output, rendering a Rich span tree showing the agent's execution trajectory. Features: - Span tree with timing, status icons, and smart labels (LLM/tool/generic) - Key attributes displayed by default (input, output, tokens, model name) - `--full` mode shows all attributes with no truncation - `--no-input`/`--no-output` for structural overview - `--name` filter prunes the tree to matching spans + ancestors - `--contains` extracts full subtrees where any descendant matches, useful for finding specific eval runs across a trace file - `--span-type` and `--status` filters - `--eval-id` to pick a specific evaluation from verbose JSON output - Auto-detects JSONL vs eval JSON format Includes 66 tests covering loading, tree building, filtering, rendering, and CLI integration.
4aed03b to
206f34b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a new
uipath traceCLI command that visualizes agent execution traces as a Rich tree.Problem
uipath run --trace-fileanduipath eval --trace-fileexport raw OpenTelemetry spans to JSONL files, but there was no way to view them after the fact — you'd get a wall of JSON.Solution
Features
--full--no-input/--no-output--name "pattern"--contains "pattern"--span-type TOOL--status error--eval-id "name"Supported inputs
uipath run --trace-file/uipath eval --trace-fileuipath eval --verbose --output-fileEval workflow
Changes
packages/uipath/src/uipath/_cli/cli_trace.py— the commandpackages/uipath/tests/cli/trace/— 66 tests + fixtures__init__.py— registeredtracein lazy commandsCLI_REFERENCE.md,AGENTS.md,README.md,docs/cli/index.md— documentation